<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>我的订单 - 洗衣服务</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Pacifico&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script src="https://cdn.tailwindcss.com"></script>
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#4F46E5',
                        secondary: '#10B981'
                    },
                    borderRadius: {
                        'none': '0px',
                        'sm': '2px',
                        DEFAULT: '4px',
                        'md': '8px',
                        'lg': '12px',
                        'xl': '16px',
                        '2xl': '20px',
                        '3xl': '24px',
                        'full': '9999px',
                        'button': '4px'
                    }
                }
            }
        }
    </script>
    <style>
        body {
            font-family: 'Inter', sans-serif;
            min-height: 1024px;
        }
        .status-badge {
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }
        .progress-bar {
            height: 6px;
            border-radius: 3px;
        }
        .order-card {
            transition: all 0.2s ease;
        }
        .order-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        }
        .tab-item {
            position: relative;
            padding-bottom: 8px;
        }
        .tab-item.active:after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 2px;
            background-color: #4F46E5;
        }
        i.fas, i.far {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 20px;
            height: 20px;
        }
    </style>
</head>
<body class="bg-gray-50">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        <!-- 顶部导航 -->
        <header class="py-6">
            <div class="flex justify-between items-center">
                <div class="flex items-center">
                    <span class="font-['Pacifico'] text-2xl text-primary">logo</span>
                    <nav class="ml-10 hidden md:flex space-x-8">
                        <a href="index.html" class="text-gray-700 hover:text-primary">首页</a>
                        <a href="order.html" class="text-gray-700 hover:text-primary">服务项目</a>
                        <a href="price.html" class="text-gray-700 hover:text-primary">我的订单</a>
                        <a href="about.html" class="text-gray-700 hover:text-primary">个人中心</a>
                    </nav>
                </div>
                <div class="flex items-center space-x-4">
                    <div class="relative">
                        <i class="fas fa-bell absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
                        <div class="absolute right-0 top-0 w-2 h-2 bg-red-500 rounded-full"></div>
                    </div>
                    <div class="flex items-center space-x-2">
                        <img src="https://ai-public.mastergo.com/ai/img_res/0c407ab5e875e1dbb2761dbe05d49f0c.jpg" alt="用户头像" class="w-8 h-8 rounded-full object-cover">
                        <span class="hidden md:inline text-sm font-medium">张雨晴</span>
                    </div>
                </div>
            </div>
        </header>

        <!-- 页面标题和筛选 -->
        <div class="py-6">
            <div class="flex justify-between items-center mb-6">
                <h1 class="text-2xl font-bold text-gray-900">我的订单</h1>
                <div class="relative">
                    <button class="flex items-center space-x-2 px-4 py-2 bg-white border border-gray-300 rounded-button text-sm font-medium text-gray-700 hover:bg-gray-50">
                        <i class="fas fa-filter"></i>
                        <span>筛选</span>
                    </button>
                </div>
            </div>

            <!-- 状态标签栏 -->
            <div class="flex space-x-6 border-b border-gray-200 mb-6">
                <a href="#" class="tab-item active text-primary font-medium">全部</a>
                <a href="#" class="tab-item text-gray-600 hover:text-primary">待取件</a>
                <a href="#" class="tab-item text-gray-600 hover:text-primary">清洗中</a>
                <a href="#" class="tab-item text-gray-600 hover:text-primary">配送中</a>
                <a href="#" class="tab-item text-gray-600 hover:text-primary">已完成</a>
            </div>
        </div>

        <!-- 订单列表 -->
        <div class="space-y-4 pb-12">
            <!-- 订单卡片1 - 超时订单 -->
            <div class="order-card bg-white rounded-xl shadow-sm overflow-hidden border border-red-100">
                <div class="bg-red-50 px-4 py-2 flex items-center">
                    <i class="fas fa-exclamation-circle text-red-500 mr-2"></i>
                    <span class="text-sm text-red-600">订单已超时，系统已自动为您补偿 20 元优惠券</span>
                </div>
                <div class="p-4">
                    <div class="flex justify-between items-start mb-3">
                        <div>
                            <h3 class="text-lg font-semibold text-gray-900">订单编号: WX20230615001</h3>
                            <p class="text-sm text-gray-500">下单时间: 2023-06-15 14:30</p>
                        </div>
                        <span class="status-badge bg-red-100 text-red-800">已超时</span>
                    </div>

                    <div class="mb-4">
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700">当前状态: 配送中</span>
                            <span class="text-gray-700">预计完成: 2023-06-17 18:00</span>
                        </div>
                        <div class="progress-bar bg-gray-200 w-full">
                            <div class="progress-bar bg-primary h-full" style="width: 80%"></div>
                        </div>
                    </div>

                    <div class="grid grid-cols-2 gap-4 mb-4">
                        <div>
                            <p class="text-sm text-gray-500">取件地址</p>
                            <p class="text-sm font-medium">北京市朝阳区建国路 88 号 SOHO 现代城 C 座 1806</p>
                        </div>
                        <div>
                            <p class="text-sm text-gray-500">送回地址</p>
                            <p class="text-sm font-medium">北京市朝阳区建国路 88 号 SOHO 现代城 C 座 1806</p>
                        </div>
                    </div>

                    <div class="flex justify-between items-center pt-4 border-t border-gray-100">
                        <div>
                            <p class="text-sm text-gray-500">订单金额</p>
                            <p class="text-lg font-bold text-gray-900">¥158.00</p>
                        </div>
                        <div class="flex space-x-2">
                            <button class="px-4 py-2 border border-gray-300 rounded-button text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 whitespace-nowrap">
                                联系配送员
                            </button>
                            <button class="px-4 py-2 bg-primary rounded-button text-sm font-medium text-white hover:bg-primary-600 whitespace-nowrap">
                                查看详情
                            </button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 订单卡片2 - 清洗中 -->
            <div class="order-card bg-white rounded-xl shadow-sm overflow-hidden">
                <div class="p-4">
                    <div class="flex justify-between items-start mb-3">
                        <div>
                            <h3 class="text-lg font-semibold text-gray-900">订单编号: WX20230616002</h3>
                            <p class="text-sm text-gray-500">下单时间: 2023-06-16 09:15</p>
                        </div>
                        <span class="status-badge bg-blue-100 text-blue-800">清洗中</span>
                    </div>
                    <div class="mb-4">
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700">当前状态: 清洗中</span>
                            <span class="text-gray-700">预计完成: 2023-06-17 14:00</span>
                        </div>
                        <div class="progress-bar bg-gray-200 w-full">
                            <div class="progress-bar bg-primary h-full" style="width: 50%"></div>
                        </div>
                    </div>

                    <div class="grid grid-cols-2 gap-4 mb-4">
                        <div>
                            <p class="text-sm text-gray-500">取件地址</p>
                            <p class="text-sm font-medium">北京市海淀区中关村南大街 5 号院 3 号楼 1202</p>
                        </div>
                        <div>
                            <p class="text-sm text-gray-500">送回地址</p>
                            <p class="text-sm font-medium">北京市海淀区中关村南大街 5 号院 3 号楼 1202</p>
                        </div>
                    </div>

                    <div class="flex justify-between items-center pt-4 border-t border-gray-100">
                        <div>
                            <p class="text-sm text-gray-500">订单金额</p>
                            <p class="text-lg font-bold text-gray-900">¥98.00</p>
                        </div>
                        <div class="flex space-x-2">
                            <button class="px-4 py-2 border border-gray-300 rounded-button text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 whitespace-nowrap">
                                联系客服
                            </button>
                            <button class="px-4 py-2 bg-primary rounded-button text-sm font-medium text-white hover:bg-primary-600 whitespace-nowrap">
                                查看详情
                            </button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 订单卡片3 - 待取件 -->
            <div class="order-card bg-white rounded-xl shadow-sm overflow-hidden">
                <div class="p-4">
                    <div class="flex justify-between items-start mb-3">
                        <div>
                            <h3 class="text-lg font-semibold text-gray-900">订单编号: WX20230617003</h3>
                            <p class="text-sm text-gray-500">下单时间: 2023-06-17 10:45</p>
                        </div>
                        <span class="status-badge bg-yellow-100 text-yellow-800">待取件</span>
                    </div>

                    <div class="mb-4">
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700">当前状态: 待取件</span>
                            <span class="text-gray-700">预计完成: 2023-06-18 16:00</span>
                        </div>
                        <div class="progress-bar bg-gray-200 w-full">
                            <div class="progress-bar bg-primary h-full" style="width: 10%"></div>
                        </div>
                    </div>

                    <div class="grid grid-cols-2 gap-4 mb-4">
                        <div>
                            <p class="text-sm text-gray-500">取件地址</p>
                            <p class="text-sm font-medium">北京市西城区金融大街 15 号鑫茂大厦 2208</p>
                        </div>
                        <div>
                            <p class="text-sm text-gray-500">送回地址</p>
                            <p class="text-sm font-medium">北京市西城区金融大街 15 号鑫茂大厦 2208</p>
                        </div>
                    </div>

                    <div class="flex justify-between items-center pt-4 border-t border-gray-100">
                        <div>
                            <p class="text-sm text-gray-500">订单金额</p>
                            <p class="text-lg font-bold text-gray-900">¥128.00</p>
                        </div>
                        <div class="flex space-x-2">
                            <button class="px-4 py-2 border border-gray-300 rounded-button text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 whitespace-nowrap">
                                修改时间
                            </button>
                            <button class="px-4 py-2 bg-primary rounded-button text-sm font-medium text-white hover:bg-primary-600 whitespace-nowrap">
                                查看详情
                            </button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 订单卡片4 - 已完成 -->
            <div class="order-card bg-white rounded-xl shadow-sm overflow-hidden">
                <div class="p-4">
                    <div class="flex justify-between items-start mb-3">
                        <div>
                            <h3 class="text-lg font-semibold text-gray-900">订单编号: WX20230610004</h3>
                            <p class="text-sm text-gray-500">下单时间: 2023-06-10 16:20</p>
                        </div>
                        <span class="status-badge bg-green-100 text-green-800">已完成</span>
                    </div>
                    <div class="mb-4">
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700">当前状态: 已完成</span>
                            <span class="text-gray-700">完成时间: 2023-06-12 11:30</span>
                        </div>
                        <div class="progress-bar bg-gray-200 w-full">
                            <div class="progress-bar bg-primary h-full" style="width: 100%"></div>
                        </div>
                    </div>

                    <div class="grid grid-cols-2 gap-4 mb-4">
                        <div>
                            <p class="text-sm text-gray-500">取件地址</p>
                            <p class="text-sm font-medium">北京市朝阳区东三环中路 1 号环球金融中心 1503</p>
                        </div>
                        <div>
                            <p class="text-sm text-gray-500">送回地址</p>
                            <p class="text-sm font-medium">北京市朝阳区东三环中路 1 号环球金融中心 1503</p>
                        </div>
                    </div>

                    <div class="flex justify-between items-center pt-4 border-t border-gray-100">
                        <div>
                            <p class="text-sm text-gray-500">订单金额</p>
                            <p class="text-lg font-bold text-gray-900">¥88.00</p>
                        </div>
                        <div class="flex space-x-2">
                            <button class="px-4 py-2 border border-gray-300 rounded-button text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 whitespace-nowrap">
                                再次下单
                            </button>
                            <button class="px-4 py-2 bg-primary rounded-button text-sm font-medium text-white hover:bg-primary-600 whitespace-nowrap">
                                查看详情
                            </button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 新增订单卡片1 -->
            <div class="order-card bg-white rounded-xl shadow-sm overflow-hidden">
                <div class="p-4">
                    <div class="flex justify-between items-start mb-3">
                        <div>
                            <h3 class="text-lg font-semibold text-gray-900">订单编号: WX20230618005</h3>
                            <p class="text-sm text-gray-500">下单时间: 2023-06-18 11:20</p>
                        </div>
                        <span class="status-badge bg-yellow-100 text-yellow-800">待取件</span>
                    </div>
                    <div class="mb-4">
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700">当前状态: 待取件</span>
                            <span class="text-gray-700">预计完成: 2023-06-19 16:00</span>
                        </div>
                        <div class="progress-bar bg-gray-200 w-full">
                            <div class="progress-bar bg-primary h-full" style="width: 10%"></div>
                        </div>
                    </div>
                    <div class="grid grid-cols-2 gap-4 mb-4">
                        <div>
                            <p class="text-sm text-gray-500">取件地址</p>
                            <p class="text-sm font-medium">上海市浦东新区张江路 88 号 1 楼</p>
                        </div>
                        <div>
                            <p class="text-sm text-gray-500">送回地址</p>
                            <p class="text-sm font-medium">上海市浦东新区张江路 88 号 1 楼</p>
                        </div>
                    </div>
                    <div class="flex justify-between items-center pt-4 border-t border-gray-100">
                        <div>
                            <p class="text-sm text-gray-500">订单金额</p>
                            <p class="text-lg font-bold text-gray-900">¥108.00</p>
                        </div>
                        <div class="flex space-x-2">
                            <button class="px-4 py-2 border border-gray-300 rounded-button text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 whitespace-nowrap">联系配送员</button>
                            <button class="px-4 py-2 bg-primary rounded-button text-sm font-medium text-white hover:bg-primary-600 whitespace-nowrap">查看详情</button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 新增订单卡片2 -->
            <div class="order-card bg-white rounded-xl shadow-sm overflow-hidden">
                <div class="p-4">
                    <div class="flex justify-between items-start mb-3">
                        <div>
                            <h3 class="text-lg font-semibold text-gray-900">订单编号: WX20230618006</h3>
                            <p class="text-sm text-gray-500">下单时间: 2023-06-18 13:40</p>
                        </div>
                        <span class="status-badge bg-blue-100 text-blue-800">清洗中</span>
                    </div>
                    <div class="mb-4">
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700">当前状态: 清洗中</span>
                            <span class="text-gray-700">预计完成: 2023-06-19 18:00</span>
                        </div>
                        <div class="progress-bar bg-gray-200 w-full">
                            <div class="progress-bar bg-primary h-full" style="width: 40%"></div>
                        </div>
                    </div>
                    <div class="grid grid-cols-2 gap-4 mb-4">
                        <div>
                            <p class="text-sm text-gray-500">取件地址</p>
                            <p class="text-sm font-medium">上海市徐汇区漕溪北路 398 号</p>
                        </div>
                        <div>
                            <p class="text-sm text-gray-500">送回地址</p>
                            <p class="text-sm font-medium">上海市徐汇区漕溪北路 398 号</p>
                        </div>
                    </div>
                    <div class="flex justify-between items-center pt-4 border-t border-gray-100">
                        <div>
                            <p class="text-sm text-gray-500">订单金额</p>
                            <p class="text-lg font-bold text-gray-900">¥88.00</p>
                        </div>
                        <div class="flex space-x-2">
                            <button class="px-4 py-2 border border-gray-300 rounded-button text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 whitespace-nowrap">联系配送员</button>
                            <button class="px-4 py-2 bg-primary rounded-button text-sm font-medium text-white hover:bg-primary-600 whitespace-nowrap">查看详情</button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 新增订单卡片3 -->
            <div class="order-card bg-white rounded-xl shadow-sm overflow-hidden">
                <div class="p-4">
                    <div class="flex justify-between items-start mb-3">
                        <div>
                            <h3 class="text-lg font-semibold text-gray-900">订单编号: WX20230618007</h3>
                            <p class="text-sm text-gray-500">下单时间: 2023-06-18 15:10</p>
                        </div>
                        <span class="status-badge bg-green-100 text-green-800">已完成</span>
                    </div>
                    <div class="mb-4">
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700">当前状态: 已完成</span>
                            <span class="text-gray-700">完成时间: 2023-06-19 10:00</span>
                        </div>
                        <div class="progress-bar bg-gray-200 w-full">
                            <div class="progress-bar bg-primary h-full" style="width: 100%"></div>
                        </div>
                    </div>
                    <div class="grid grid-cols-2 gap-4 mb-4">
                        <div>
                            <p class="text-sm text-gray-500">取件地址</p>
                            <p class="text-sm font-medium">上海市虹口区四川北路 888 号</p>
                        </div>
                        <div>
                            <p class="text-sm text-gray-500">送回地址</p>
                            <p class="text-sm font-medium">上海市虹口区四川北路 888 号</p>
                        </div>
                    </div>
                    <div class="flex justify-between items-center pt-4 border-t border-gray-100">
                        <div>
                            <p class="text-sm text-gray-500">订单金额</p>
                            <p class="text-lg font-bold text-gray-900">¥128.00</p>
                        </div>
                        <div class="flex space-x-2">
                            <button class="px-4 py-2 border border-gray-300 rounded-button text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 whitespace-nowrap">再次下单</button>
                            <button class="px-4 py-2 bg-primary rounded-button text-sm font-medium text-white hover:bg-primary-600 whitespace-nowrap">查看详情</button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 新增订单卡片4 -->
            <div class="order-card bg-white rounded-xl shadow-sm overflow-hidden">
                <div class="p-4">
                    <div class="flex justify-between items-start mb-3">
                        <div>
                            <h3 class="text-lg font-semibold text-gray-900">订单编号: WX20230618008</h3>
                            <p class="text-sm text-gray-500">下单时间: 2023-06-18 16:30</p>
                        </div>
                        <span class="status-badge bg-blue-100 text-blue-800">清洗中</span>
                    </div>
                    <div class="mb-4">
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700">当前状态: 清洗中</span>
                            <span class="text-gray-700">预计完成: 2023-06-19 20:00</span>
                        </div>
                        <div class="progress-bar bg-gray-200 w-full">
                            <div class="progress-bar bg-primary h-full" style="width: 60%"></div>
                        </div>
                    </div>
                    <div class="grid grid-cols-2 gap-4 mb-4">
                        <div>
                            <p class="text-sm text-gray-500">取件地址</p>
                            <p class="text-sm font-medium">上海市杨浦区五角场 200 号</p>
                        </div>
                        <div>
                            <p class="text-sm text-gray-500">送回地址</p>
                            <p class="text-sm font-medium">上海市杨浦区五角场 200 号</p>
                        </div>
                    </div>
                    <div class="flex justify-between items-center pt-4 border-t border-gray-100">
                        <div>
                            <p class="text-sm text-gray-500">订单金额</p>
                            <p class="text-lg font-bold text-gray-900">¥98.00</p>
                        </div>
                        <div class="flex space-x-2">
                            <button class="px-4 py-2 border border-gray-300 rounded-button text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 whitespace-nowrap">联系配送员</button>
                            <button class="px-4 py-2 bg-primary rounded-button text-sm font-medium text-white hover:bg-primary-600 whitespace-nowrap">查看详情</button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 新增订单卡片5 -->
            <div class="order-card bg-white rounded-xl shadow-sm overflow-hidden">
                <div class="p-4">
                    <div class="flex justify-between items-start mb-3">
                        <div>
                            <h3 class="text-lg font-semibold text-gray-900">订单编号: WX20230618009</h3>
                            <p class="text-sm text-gray-500">下单时间: 2023-06-18 18:00</p>
                        </div>
                        <span class="status-badge bg-yellow-100 text-yellow-800">待取件</span>
                    </div>
                    <div class="mb-4">
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700">当前状态: 待取件</span>
                            <span class="text-gray-700">预计完成: 2023-06-19 22:00</span>
                        </div>
                        <div class="progress-bar bg-gray-200 w-full">
                            <div class="progress-bar bg-primary h-full" style="width: 5%"></div>
                        </div>
                    </div>
                    <div class="grid grid-cols-2 gap-4 mb-4">
                        <div>
                            <p class="text-sm text-gray-500">取件地址</p>
                            <p class="text-sm font-medium">上海市闵行区莘庄路 66 号</p>
                        </div>
                        <div>
                            <p class="text-sm text-gray-500">送回地址</p>
                            <p class="text-sm font-medium">上海市闵行区莘庄路 66 号</p>
                        </div>
                    </div>
                    <div class="flex justify-between items-center pt-4 border-t border-gray-100">
                        <div>
                            <p class="text-sm text-gray-500">订单金额</p>
                            <p class="text-lg font-bold text-gray-900">¥78.00</p>
                        </div>
                        <div class="flex space-x-2">
                            <button class="px-4 py-2 border border-gray-300 rounded-button text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 whitespace-nowrap">联系配送员</button>
                            <button class="px-4 py-2 bg-primary rounded-button text-sm font-medium text-white hover:bg-primary-600 whitespace-nowrap">查看详情</button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 新增订单卡片6 -->
            <div class="order-card bg-white rounded-xl shadow-sm overflow-hidden">
                <div class="p-4">
                    <div class="flex justify-between items-start mb-3">
                        <div>
                            <h3 class="text-lg font-semibold text-gray-900">订单编号: WX20230618010</h3>
                            <p class="text-sm text-gray-500">下单时间: 2023-06-18 19:30</p>
                        </div>
                        <span class="status-badge bg-blue-100 text-blue-800">清洗中</span>
                    </div>
                    <div class="mb-4">
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700">当前状态: 清洗中</span>
                            <span class="text-gray-700">预计完成: 2023-06-19 23:00</span>
                        </div>
                        <div class="progress-bar bg-gray-200 w-full">
                            <div class="progress-bar bg-primary h-full" style="width: 30%"></div>
                        </div>
                    </div>
                    <div class="grid grid-cols-2 gap-4 mb-4">
                        <div>
                            <p class="text-sm text-gray-500">取件地址</p>
                            <p class="text-sm font-medium">上海市宝山区友谊路 100 号</p>
                        </div>
                        <div>
                            <p class="text-sm text-gray-500">送回地址</p>
                            <p class="text-sm font-medium">上海市宝山区友谊路 100 号</p>
                        </div>
                    </div>
                    <div class="flex justify-between items-center pt-4 border-t border-gray-100">
                        <div>
                            <p class="text-sm text-gray-500">订单金额</p>
                            <p class="text-lg font-bold text-gray-900">¥68.00</p>
                        </div>
                        <div class="flex space-x-2">
                            <button class="px-4 py-2 border border-gray-300 rounded-button text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 whitespace-nowrap">联系配送员</button>
                            <button class="px-4 py-2 bg-primary rounded-button text-sm font-medium text-white hover:bg-primary-600 whitespace-nowrap">查看详情</button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 新增订单卡片7 -->
            <div class="order-card bg-white rounded-xl shadow-sm overflow-hidden">
                <div class="p-4">
                    <div class="flex justify-between items-start mb-3">
                        <div>
                            <h3 class="text-lg font-semibold text-gray-900">订单编号: WX20230618011</h3>
                            <p class="text-sm text-gray-500">下单时间: 2023-06-18 20:10</p>
                        </div>
                        <span class="status-badge bg-green-100 text-green-800">已完成</span>
                    </div>
                    <div class="mb-4">
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700">当前状态: 已完成</span>
                            <span class="text-gray-700">完成时间: 2023-06-19 12:00</span>
                        </div>
                        <div class="progress-bar bg-gray-200 w-full">
                            <div class="progress-bar bg-primary h-full" style="width: 100%"></div>
                        </div>
                    </div>
                    <div class="grid grid-cols-2 gap-4 mb-4">
                        <div>
                            <p class="text-sm text-gray-500">取件地址</p>
                            <p class="text-sm font-medium">上海市嘉定区江桥路 88 号</p>
                        </div>
                        <div>
                            <p class="text-sm text-gray-500">送回地址</p>
                            <p class="text-sm font-medium">上海市嘉定区江桥路 88 号</p>
                        </div>
                    </div>
                    <div class="flex justify-between items-center pt-4 border-t border-gray-100">
                        <div>
                            <p class="text-sm text-gray-500">订单金额</p>
                            <p class="text-lg font-bold text-gray-900">¥158.00</p>
                        </div>
                        <div class="flex space-x-2">
                            <button class="px-4 py-2 border border-gray-300 rounded-button text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 whitespace-nowrap">再次下单</button>
                            <button class="px-4 py-2 bg-primary rounded-button text-sm font-medium text-white hover:bg-primary-600 whitespace-nowrap">查看详情</button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 新增订单卡片8 -->
            <div class="order-card bg-white rounded-xl shadow-sm overflow-hidden">
                <div class="p-4">
                    <div class="flex justify-between items-start mb-3">
                        <div>
                            <h3 class="text-lg font-semibold text-gray-900">订单编号: WX20230618012</h3>
                            <p class="text-sm text-gray-500">下单时间: 2023-06-18 21:00</p>
                        </div>
                        <span class="status-badge bg-yellow-100 text-yellow-800">待取件</span>
                    </div>
                    <div class="mb-4">
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700">当前状态: 待取件</span>
                            <span class="text-gray-700">预计完成: 2023-06-20 10:00</span>
                        </div>
                        <div class="progress-bar bg-gray-200 w-full">
                            <div class="progress-bar bg-primary h-full" style="width: 15%"></div>
                        </div>
                    </div>
                    <div class="grid grid-cols-2 gap-4 mb-4">
                        <div>
                            <p class="text-sm text-gray-500">取件地址</p>
                            <p class="text-sm font-medium">上海市松江区新松江路 123 号</p>
                        </div>
                        <div>
                            <p class="text-sm text-gray-500">送回地址</p>
                            <p class="text-sm font-medium">上海市松江区新松江路 123 号</p>
                        </div>
                    </div>
                    <div class="flex justify-between items-center pt-4 border-t border-gray-100">
                        <div>
                            <p class="text-sm text-gray-500">订单金额</p>
                            <p class="text-lg font-bold text-gray-900">¥118.00</p>
                        </div>
                        <div class="flex space-x-2">
                            <button class="px-4 py-2 border border-gray-300 rounded-button text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 whitespace-nowrap">联系配送员</button>
                            <button class="px-4 py-2 bg-primary rounded-button text-sm font-medium text-white hover:bg-primary-600 whitespace-nowrap">查看详情</button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 新增订单卡片9 -->
            <div class="order-card bg-white rounded-xl shadow-sm overflow-hidden">
                <div class="p-4">
                    <div class="flex justify-between items-start mb-3">
                        <div>
                            <h3 class="text-lg font-semibold text-gray-900">订单编号: WX20230618013</h3>
                            <p class="text-sm text-gray-500">下单时间: 2023-06-18 22:10</p>
                        </div>
                        <span class="status-badge bg-blue-100 text-blue-800">清洗中</span>
                    </div>
                    <div class="mb-4">
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700">当前状态: 清洗中</span>
                            <span class="text-gray-700">预计完成: 2023-06-20 12:00</span>
                        </div>
                        <div class="progress-bar bg-gray-200 w-full">
                            <div class="progress-bar bg-primary h-full" style="width: 70%"></div>
                        </div>
                    </div>
                    <div class="grid grid-cols-2 gap-4 mb-4">
                        <div>
                            <p class="text-sm text-gray-500">取件地址</p>
                            <p class="text-sm font-medium">上海市青浦区盈港东路 88 号</p>
                        </div>
                        <div>
                            <p class="text-sm text-gray-500">送回地址</p>
                            <p class="text-sm font-medium">上海市青浦区盈港东路 88 号</p>
                        </div>
                    </div>
                    <div class="flex justify-between items-center pt-4 border-t border-gray-100">
                        <div>
                            <p class="text-sm text-gray-500">订单金额</p>
                            <p class="text-lg font-bold text-gray-900">¥108.00</p>
                        </div>
                        <div class="flex space-x-2">
                            <button class="px-4 py-2 border border-gray-300 rounded-button text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 whitespace-nowrap">联系配送员</button>
                            <button class="px-4 py-2 bg-primary rounded-button text-sm font-medium text-white hover:bg-primary-600 whitespace-nowrap">查看详情</button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 新增订单卡片10 -->
            <div class="order-card bg-white rounded-xl shadow-sm overflow-hidden">
                <div class="p-4">
                    <div class="flex justify-between items-start mb-3">
                        <div>
                            <h3 class="text-lg font-semibold text-gray-900">订单编号: WX20230618014</h3>
                            <p class="text-sm text-gray-500">下单时间: 2023-06-18 23:00</p>
                        </div>
                        <span class="status-badge bg-green-100 text-green-800">已完成</span>
                    </div>
                    <div class="mb-4">
                        <div class="flex justify-between text-sm mb-1">
                            <span class="text-gray-700">当前状态: 已完成</span>
                            <span class="text-gray-700">完成时间: 2023-06-20 09:00</span>
                        </div>
                        <div class="progress-bar bg-gray-200 w-full">
                            <div class="progress-bar bg-primary h-full" style="width: 100%"></div>
                        </div>
                    </div>
                    <div class="grid grid-cols-2 gap-4 mb-4">
                        <div>
                            <p class="text-sm text-gray-500">取件地址</p>
                            <p class="text-sm font-medium">上海市奉贤区南桥路 66 号</p>
                        </div>
                        <div>
                            <p class="text-sm text-gray-500">送回地址</p>
                            <p class="text-sm font-medium">上海市奉贤区南桥路 66 号</p>
                        </div>
                    </div>
                    <div class="flex justify-between items-center pt-4 border-t border-gray-100">
                        <div>
                            <p class="text-sm text-gray-500">订单金额</p>
                            <p class="text-lg font-bold text-gray-900">¥138.00</p>
                        </div>
                        <div class="flex space-x-2">
                            <button class="px-4 py-2 border border-gray-300 rounded-button text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 whitespace-nowrap">再次下单</button>
                            <button class="px-4 py-2 bg-primary rounded-button text-sm font-medium text-white hover:bg-primary-600 whitespace-nowrap">查看详情</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 底部功能区 -->
        <div class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 py-3 px-4 shadow-sm">
            <div class="max-w-7xl mx-auto flex justify-between items-center">
                <div class="flex items-center space-x-4">
                    <button class="flex items-center space-x-2 px-4 py-2 bg-primary rounded-button text-sm font-medium text-white hover:bg-primary-600">
                        <i class="fas fa-phone-alt"></i>
                        <span>联系客服</span>
                    </button>
                    <div class="relative w-64">
                        <i class="fas fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
                        <input type="text" placeholder="搜索订单..." class="pl-10 pr-4 py-2 w-full border border-gray-300 rounded-button text-sm focus:ring-primary focus:border-primary">
                    </div>
                </div>
                <div class="flex items-center space-x-2">
                    <button class="px-3 py-1 text-sm text-gray-600 hover:text-primary">上一页</button>
                    <span class="px-3 py-1 text-sm text-gray-600">1/3</span>
                    <button class="px-3 py-1 text-sm text-gray-600 hover:text-primary">下一页</button>
                </div>
            </div>
        </div>
    </div>

    <div id="filter-modal" class="fixed inset-0 bg-black bg-opacity-30 flex items-center justify-center z-50 hidden">
        <div class="bg-white rounded-xl shadow-lg p-8 w-80 relative">
            <button class="absolute top-2 right-2 text-gray-400 hover:text-primary" onclick="document.getElementById('filter-modal').classList.add('hidden')"><i class="fas fa-times"></i></button>
            <h2 class="text-lg font-bold mb-4">筛选订单</h2>
            <form id="filter-form" class="space-y-4">
                <div>
                    <label class="block text-sm text-gray-600 mb-1">订单编号</label>
                    <input type="text" name="orderNo" class="w-full border border-gray-300 rounded px-3 py-2">
                </div>
                <div>
                    <label class="block text-sm text-gray-600 mb-1">状态</label>
                    <select name="status" class="w-full border border-gray-300 rounded px-3 py-2">
                        <option value="">全部</option>
                        <option value="待取件">待取件</option>
                        <option value="清洗中">清洗中</option>
                        <option value="配送中">配送中</option>
                        <option value="已完成">已完成</option>
                    </select>
                </div>
                <div>
                    <label class="block text-sm text-gray-600 mb-1">下单时间</label>
                    <input type="date" name="orderDate" class="w-full border border-gray-300 rounded px-3 py-2">
                </div>
                <button type="submit" class="w-full bg-primary text-white rounded py-2 font-medium mt-2">应用筛选</button>
            </form>
        </div>
    </div>

    <!-- 订单详情弹窗 -->
    <div id="order-detail-modal" class="fixed inset-0 bg-black bg-opacity-30 flex items-center justify-center z-50 hidden">
        <div class="bg-white rounded-xl shadow-lg p-8 w-full max-w-lg relative">
            <button class="absolute top-2 right-2 text-gray-400 hover:text-primary" onclick="closeOrderDetailModal()"><i class="fas fa-times"></i></button>
            <h2 class="text-xl font-bold mb-4">订单详情</h2>
            <div id="order-detail-content" class="space-y-2 text-gray-700 text-base">
                <!-- 动态填充 -->
            </div>
        </div>
    </div>

    <!-- 联系配送员弹窗 -->
    <div id="courier-modal" class="fixed inset-0 bg-black bg-opacity-30 flex items-center justify-center z-50 hidden">
        <div class="bg-white rounded-xl shadow-lg p-8 w-full max-w-md relative">
            <button class="absolute top-2 right-2 text-gray-400 hover:text-primary" onclick="closeCourierModal()"><i class="fas fa-times"></i></button>
            <h2 class="text-xl font-bold mb-4">联系配送员</h2>
            <div id="courier-content" class="space-y-4 text-gray-700">
                <!-- 动态填充 -->
            </div>
        </div>
    </div>

    <!-- 评价弹窗 -->
    <div id="review-modal" class="fixed inset-0 bg-black bg-opacity-30 flex items-center justify-center z-50 hidden">
        <div class="bg-white rounded-xl shadow-lg p-8 w-full max-w-md relative">
            <button class="absolute top-2 right-2 text-gray-400 hover:text-primary" onclick="closeReviewModal()"><i class="fas fa-times"></i></button>
            <h2 class="text-xl font-bold mb-4">订单评价</h2>
            <form id="review-form" class="space-y-4">
                <div>
                    <label class="block text-sm text-gray-600 mb-1">星级评分</label>
                    <div id="review-stars" class="flex space-x-2 text-2xl cursor-pointer">
                        <i class="fas fa-star text-gray-300" data-value="1"></i>
                        <i class="fas fa-star text-gray-300" data-value="2"></i>
                        <i class="fas fa-star text-gray-300" data-value="3"></i>
                        <i class="fas fa-star text-gray-300" data-value="4"></i>
                        <i class="fas fa-star text-gray-300" data-value="5"></i>
                    </div>
                </div>
                <div>
                    <label class="block text-sm text-gray-600 mb-1">评价内容</label>
                    <textarea name="content" rows="3" class="w-full border border-gray-300 rounded px-3 py-2" required placeholder="请填写您的评价..."></textarea>
                </div>
                <button type="submit" class="w-full bg-primary text-white rounded py-2 font-medium mt-2">提交评价</button>
            </form>
        </div>
    </div>

    <script>
        // 订单状态标签筛选
        document.querySelectorAll('.tab-item').forEach(tab => {
            tab.addEventListener('click', function(e) {
                e.preventDefault();
                document.querySelectorAll('.tab-item').forEach(t => t.classList.remove('active'));
                this.classList.add('active');
                const status = this.textContent.trim();
                document.querySelectorAll('.order-card').forEach(card => {
                    if (status === '全部' || card.innerHTML.includes(status)) {
                        card.style.display = '';
                    } else {
                        card.style.display = 'none';
                    }
                });
            });
        });

        // 筛选弹窗
        document.querySelector('button.flex.items-center.space-x-2').onclick = function() {
            document.getElementById('filter-modal').classList.remove('hidden');
        };
        document.getElementById('filter-form').onsubmit = function(e) {
            e.preventDefault();
            const orderNo = this.orderNo.value.trim();
            const status = this.status.value;
            const orderDate = this.orderDate.value;
            document.getElementById('filter-modal').classList.add('hidden');
            document.querySelectorAll('.order-card').forEach(card => {
                let show = true;
                if (orderNo && !card.innerHTML.includes(orderNo)) show = false;
                if (status && !card.innerHTML.includes(status)) show = false;
                if (orderDate && !card.innerHTML.includes(orderDate)) show = false;
                card.style.display = show ? '' : 'none';
            });
        };

        // 关闭订单详情弹窗
        function closeOrderDetailModal() {
            document.getElementById('order-detail-modal').classList.add('hidden');
        }

        // 关闭联系配送员弹窗
        function closeCourierModal() {
            document.getElementById('courier-modal').classList.add('hidden');
        }

        // 点击弹窗背景关闭弹窗
        document.getElementById('order-detail-modal').addEventListener('click', function(e) {
            if (e.target === this) {
                closeOrderDetailModal();
            }
        });

        document.getElementById('courier-modal').addEventListener('click', function(e) {
            if (e.target === this) {
                closeCourierModal();
            }
        });

        // 为所有订单卡片添加事件监听
        document.querySelectorAll('.order-card').forEach(card => {
            // 查看详情按钮
            const detailBtn = card.querySelector('button.bg-primary');
            if (detailBtn && detailBtn.textContent.trim() === '查看详情') {
                detailBtn.addEventListener('click', function(e) {
                    e.stopPropagation();
                    showOrderDetail(card);
                });
            }

            // 联系配送员按钮
            const courierBtn = card.querySelector('button.border.border-gray-300');
            if (courierBtn && courierBtn.textContent.trim() === '联系配送员') {
                courierBtn.addEventListener('click', function(e) {
                    e.stopPropagation();
                    showCourierInfo(card);
                });
            }
        });

        // 显示订单详情
        function showOrderDetail(card) {
            const detailModal = document.getElementById('order-detail-modal');
            const detailContent = document.getElementById('order-detail-content');
            
            // 获取订单信息
            const orderNo = card.querySelector('h3').textContent.replace('订单编号: ', '').trim();
            const orderTime = card.querySelector('p.text-sm.text-gray-500').textContent.replace('下单时间: ', '').trim();
            const status = card.querySelector('.status-badge').textContent.trim();
            const amount = card.querySelector('.text-lg.font-bold.text-gray-900').textContent.trim();
            const address = card.querySelectorAll('.grid-cols-2 .font-medium');
            const pickAddr = address[0] ? address[0].textContent : '';
            const sendAddr = address[1] ? address[1].textContent : '';
            
            // 获取进度信息
            const progressBar = card.querySelector('.progress-bar.bg-primary');
            const progressText = card.querySelector('.text-gray-700');
            let progressInfo = '';
            if (progressBar && progressBar.style.width) {
                progressInfo = `<div><strong>当前进度：</strong>${progressBar.style.width}</div>`;
            }
            if (progressText) {
                const statusText = progressText.textContent.trim();
                if (statusText) {
                    progressInfo = `<div><strong>当前状态：</strong>${statusText}</div>` + progressInfo;
                }
            }

            // 获取预计完成时间
            const timeInfo = card.querySelectorAll('.text-gray-700');
            let expectedTime = '';
            timeInfo.forEach(info => {
                const text = info.textContent.trim();
                if (text.includes('预计完成') || text.includes('完成时间')) {
                    expectedTime = `<div><strong>${text.split(':')[0]}：</strong>${text.split(':')[1]}</div>`;
                }
            });

            // 填充详情内容
            detailContent.innerHTML = `
                <div class="grid grid-cols-1 gap-3">
                    <div class="bg-gray-50 p-3 rounded-lg">
                        <div class="font-semibold text-gray-900 mb-2">基本信息</div>
                        <div><strong>订单编号：</strong>${orderNo}</div>
                        <div><strong>下单时间：</strong>${orderTime}</div>
                        <div><strong>订单状态：</strong><span class="inline-block px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm">${status}</span></div>
                        <div><strong>订单金额：</strong><span class="text-lg font-bold text-primary">${amount}</span></div>
                    </div>
                    
                    <div class="bg-gray-50 p-3 rounded-lg">
                        <div class="font-semibold text-gray-900 mb-2">地址信息</div>
                        <div><strong>取件地址：</strong>${pickAddr}</div>
                        <div><strong>送回地址：</strong>${sendAddr}</div>
                    </div>
                    
                    <div class="bg-gray-50 p-3 rounded-lg">
                        <div class="font-semibold text-gray-900 mb-2">进度信息</div>
                        ${progressInfo}
                        ${expectedTime}
                    </div>
                    
                    <div class="bg-gray-50 p-3 rounded-lg">
                        <div class="font-semibold text-gray-900 mb-2">配送员信息</div>
                        <div><strong>配送员：</strong>张师傅</div>
                        <div><strong>联系电话：</strong>138-xxxx-xxxx / 微信：kuaidi123</div>
                    </div>
                </div>
            `;
            
            detailModal.classList.remove('hidden');
        }

        // 显示配送员信息
        function showCourierInfo(card) {
            const courierModal = document.getElementById('courier-modal');
            const courierContent = document.getElementById('courier-content');
            
            // 获取订单信息
            const orderNo = card.querySelector('h3').textContent.replace('订单编号: ', '').trim();
            const status = card.querySelector('.status-badge').textContent.trim();
            
            // 根据订单状态显示不同的配送员信息
            let courierInfo = '';
            if (status === '待取件') {
                courierInfo = `
                    <div class="bg-blue-50 p-4 rounded-lg">
                        <div class="flex items-center mb-3">
                            <i class="fas fa-user-circle text-2xl text-blue-600 mr-3"></i>
                            <div>
                                <div class="font-semibold text-gray-900">李师傅</div>
                                <div class="text-sm text-gray-600">取件配送员</div>
                            </div>
                        </div>
                        <div class="space-y-2">
                            <div class="flex items-center">
                                <i class="fas fa-phone text-green-600 mr-2"></i>
                                <span>138-1111-2222</span>
                            </div>
                            <div class="flex items-center">
                                <i class="fab fa-weixin text-green-600 mr-2"></i>
                                <span>qujian123</span>
                            </div>
                            <div class="flex items-center">
                                <i class="fas fa-clock text-blue-600 mr-2"></i>
                                <span>预计取件时间：今天 14:00-16:00</span>
                            </div>
                        </div>
                    </div>
                `;
            } else if (status === '清洗中') {
                courierInfo = `
                    <div class="bg-yellow-50 p-4 rounded-lg">
                        <div class="flex items-center mb-3">
                            <i class="fas fa-user-circle text-2xl text-yellow-600 mr-3"></i>
                            <div>
                                <div class="font-semibold text-gray-900">王师傅</div>
                                <div class="text-sm text-gray-600">清洗中心负责人</div>
                            </div>
                        </div>
                        <div class="space-y-2">
                            <div class="flex items-center">
                                <i class="fas fa-phone text-green-600 mr-2"></i>
                                <span>138-3333-4444</span>
                            </div>
                            <div class="flex items-center">
                                <i class="fab fa-weixin text-green-600 mr-2"></i>
                                <span>qixi123</span>
                            </div>
                            <div class="flex items-center">
                                <i class="fas fa-clock text-yellow-600 mr-2"></i>
                                <span>预计完成时间：明天 14:00</span>
                            </div>
                        </div>
                    </div>
                `;
            } else if (status === '配送中' || status === '已超时') {
                courierInfo = `
                    <div class="bg-green-50 p-4 rounded-lg">
                        <div class="flex items-center mb-3">
                            <i class="fas fa-user-circle text-2xl text-green-600 mr-3"></i>
                            <div>
                                <div class="font-semibold text-gray-900">张师傅</div>
                                <div class="text-sm text-gray-600">配送员</div>
                            </div>
                        </div>
                        <div class="space-y-2">
                            <div class="flex items-center">
                                <i class="fas fa-phone text-green-600 mr-2"></i>
                                <span>138-5555-6666</span>
                            </div>
                            <div class="flex items-center">
                                <i class="fab fa-weixin text-green-600 mr-2"></i>
                                <span>peisong123</span>
                            </div>
                            <div class="flex items-center">
                                <i class="fas fa-clock text-green-600 mr-2"></i>
                                <span>预计送达时间：今天 18:00</span>
                            </div>
                        </div>
                    </div>
                `;
            } else {
                courierInfo = `
                    <div class="bg-gray-50 p-4 rounded-lg">
                        <div class="flex items-center mb-3">
                            <i class="fas fa-user-circle text-2xl text-gray-600 mr-3"></i>
                            <div>
                                <div class="font-semibold text-gray-900">客服中心</div>
                                <div class="text-sm text-gray-600">订单已完成</div>
                            </div>
                        </div>
                        <div class="space-y-2">
                            <div class="flex items-center">
                                <i class="fas fa-phone text-green-600 mr-2"></i>
                                <span>400-888-9999</span>
                            </div>
                            <div class="flex items-center">
                                <i class="fab fa-weixin text-green-600 mr-2"></i>
                                <span>kefu123</span>
                            </div>
                            <div class="flex items-center">
                                <i class="fas fa-info-circle text-blue-600 mr-2"></i>
                                <span>如需再次下单，请联系客服</span>
                            </div>
                        </div>
                    </div>
                `;
            }
            
            courierContent.innerHTML = `
                <div class="text-center mb-4">
                    <div class="text-sm text-gray-600">订单编号：${orderNo}</div>
                    <div class="text-sm text-gray-600">当前状态：${status}</div>
                </div>
                ${courierInfo}
                <div class="mt-4 text-center">
                    <button onclick="closeCourierModal()" class="px-6 py-2 bg-primary text-white rounded-lg hover:bg-primary-600">
                        关闭
                    </button>
                </div>
            `;
            
            courierModal.classList.remove('hidden');
        }

        // 1. 为已完成订单添加"评价"按钮
        document.querySelectorAll('.order-card').forEach(card => {
            const status = card.querySelector('.status-badge');
            if (status && status.textContent.trim() === '已完成') {
                // 检查是否已存在评价按钮，避免重复添加
                if (!card.querySelector('.btn-review')) {
                    const btn = document.createElement('button');
                    btn.className = 'px-4 py-2 border border-primary text-primary rounded-button text-sm font-medium bg-white hover:bg-blue-50 whitespace-nowrap btn-review';
                    btn.textContent = '评价';
                    btn.style.marginLeft = '8px';
                    // 插入到"再次下单"按钮后面
                    const btnGroup = card.querySelector('.flex.space-x-2');
                    if (btnGroup) btnGroup.appendChild(btn);
                }
            }
        });

        // 2. 评价弹窗逻辑
        const reviewModal = document.getElementById('review-modal');
        function closeReviewModal() { reviewModal.classList.add('hidden'); }
        reviewModal.addEventListener('click', function(e) { if (e.target === this) closeReviewModal(); });

        // 3. 绑定评价按钮事件
        document.querySelectorAll('.btn-review').forEach(btn => {
            btn.onclick = function(e) {
                e.stopPropagation();
                reviewModal.classList.remove('hidden');
                // 重置星级和内容
                setReviewStars(0);
                document.querySelector('#review-form textarea').value = '';
            };
        });

        // 4. 星级评分交互
        function setReviewStars(star) {
            document.querySelectorAll('#review-stars i').forEach((el, idx) => {
                el.classList.toggle('text-yellow-400', idx < star);
                el.classList.toggle('text-gray-300', idx >= star);
            });
            document.getElementById('review-form').setAttribute('data-star', star);
        }
        document.querySelectorAll('#review-stars i').forEach(star => {
            star.onmouseenter = function() { setReviewStars(Number(this.dataset.value)); };
            star.onclick = function() { setReviewStars(Number(this.dataset.value)); };
        });
        document.getElementById('review-stars').onmouseleave = function() {
            const star = Number(document.getElementById('review-form').getAttribute('data-star')) || 0;
            setReviewStars(star);
        };

        // 5. 提交评价
        document.getElementById('review-form').onsubmit = function(e) {
            e.preventDefault();
            const star = Number(this.getAttribute('data-star')) || 0;
            const content = this.content.value.trim();
            if (!star) { alert('请点击选择星级评分'); return; }
            if (!content) { alert('请填写评价内容'); return; }
            closeReviewModal();
            alert('评价提交成功！感谢您的反馈。');
        };

        // 补充"清洗中"和"配送中"订单的预计时间显示
        document.querySelectorAll('.order-card').forEach(card => {
            const statusBadge = card.querySelector('.status-badge');
            if (!statusBadge) return;
            const status = statusBadge.textContent.trim();
            // 找到进度信息区域
            let progressInfoCard = null;
            card.querySelectorAll('.bg-gray-50.p-3.rounded-lg').forEach(div => {
                if (div.querySelector('.font-semibold') && div.querySelector('.font-semibold').textContent.includes('进度信息')) {
                    progressInfoCard = div;
                }
            });
            if (!progressInfoCard) return;
            // 检查是否已存在预计时间，避免重复添加
            if (progressInfoCard.innerHTML.includes('预计完成时间') || progressInfoCard.innerHTML.includes('预计送达时间')) return;
            // 提取原有时间
            let timeText = '';
            card.querySelectorAll('.text-gray-700').forEach(span => {
                const txt = span.textContent.trim();
                if (status === '清洗中' && txt.includes('预计完成')) timeText = txt.split('：').pop();
                if (status === '配送中' && txt.includes('预计完成')) timeText = txt.split('：').pop();
            });
            // 如果找不到，使用假数据
            if (!timeText) {
                if (status === '清洗中') timeText = '明天 18:00';
                if (status === '配送中') timeText = '今天 20:00';
            }
            if (status === '清洗中') {
                progressInfoCard.innerHTML += `<div class='mt-1 text-sm text-blue-600'><strong>预计完成时间：</strong>${timeText}</div>`;
            }
            if (status === '配送中') {
                progressInfoCard.innerHTML += `<div class='mt-1 text-sm text-green-600'><strong>预计送达时间：</strong>${timeText}</div>`;
            }
        });
    </script>
</body>
</html>